﻿@using ApCMS.Common
@using ApCMS.Models
@{
    AppSetting appSet = new AppSetting();
    LayoutModels layoutModels = new LayoutModels();   
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="MSHTML 6.00.6000.16735" name="GENERATOR" />
    <meta name="keywords" content="@(appSet.SeoDescription)" />
    <meta name="description" content="@(appSet.SeoDescription)" />
    <title>@(appSet.CompanyName)</title>
    <link rel="stylesheet" href="@Url.Content("~/Themes/ymdz/Content/css/reset.css")" media="screen" />
    <link rel="stylesheet" href="@Url.Content("~/Themes/ymdz/Content/css/960.css")"
        media="screen" />
    <link rel="stylesheet" href="@Url.Content("~/Themes/ymdz/Content/css/style.css")"
        media="screen" />
    <link rel="stylesheet" href="@Url.Content("~/Themes/ymdz/Content/css/structure.css")"
        media="screen" />
    <link rel="stylesheet" href="@Url.Content("~/Themes/ymdz/Content/css/form.css")"
        media="screen" />
    <link rel="stylesheet" href="@Url.Content("~/Themes/ymdz/Content/css/awards.css")"
        media="screen" />
    <script type="text/javascript" language="javascript">
        //加入收藏
        function AddFavorite(sURL, sTitle) {
            sURL = encodeURI(sURL);
            try {
                window.external.addFavorite(sURL, sTitle);
            } catch (e) {
                try {
                    window.sidebar.addPanel(sTitle, sURL, "");
                } catch (e) {
                    alert("加入收藏失败，请使用Ctrl+D进行添加,或手动在浏览器里进行设置.");
                }
            }
        }
        //设为首页
        function SetHome(url) {
            if (document.all) {
                document.body.style.behavior = 'url(#default#homepage)';
                document.body.setHomePage(url);
            } else {
                alert("您好,您的浏览器不支持自动设置页面为首页功能,请您手动在浏览器里设置该页面为首页!");
            }
        }
 
    </script>
</head>
<body>
    <!--BEGIN OUTERMOST WRAPPER-->
    <div id="mainWrapper" class="clearfix">
        <!--BEGIN UNIVERSAL WRAPPER-->
        <div id="universalWrapper">
            <!--BEGIN UNIVERSAL NAV CONTAINER-->
            <div id="universalContainer" class="container_12 clearfix">
                <!--Begin Universal Nav-->
                <div class="grid_12">
                    <div id="universalNav">
                        <h2>
                            ssss
                        </h2>
                        <ul>
                            <li><a onclick="SetHome(window.location)" href="javascript:void(0)">设为首页</a></li>
                            <li><a onclick="AddFavorite(window.location,document.title)" href="javascript:void(0)">
                                加入收藏</a></li>
                            <li><a href="@Url.Action("SetThemes", "Home", new { themes = "mobile" })">手机版</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <!--END UNIVERSAL WRAPPER-->
        <!--BEGIN MASTHEAD WRAPPER-->
        <div class="mainCap top">
            <!--mainCap top-->
        </div>
        <div id="mastheadWrapper">
            <!--BEGIN MASTHEAD CONTAINER-->
            <div id="mastheadContainer" class="container_12 clearfix">
                <!--Begin Header and Logo-->
                <div class="grid_3">
                    <div id="headerLogo">
                        <div class="siteTitle">
                            <a href="#"><span class="logo aia"></span>东莞市奕鸣电子有限公司</a></div>
                    </div>
                </div>
                <!--Begin Identity Nav-->
                <div class="grid_9">
                    <div id="identityNav">
                        <h2>
                            Sign In, Renew, Sign Up</h2>
                        <!--If user IS signed in, used UL below-->
                        <ul class="signedOut">
                            <li><a class="first">电话：@(appSet.Telphone)</a></li>
                            <li><a class="renew">传真：@(appSet.Fax)</a></li>
                            <li><a class="last">@(DateTime.Now.ToString("yyyy-MM-dd"))</a></li>
                        </ul>
                    </div>
                </div>
                <!--Begin Member Nav-->
                <div class="grid_6">
                    <div id="memberNav">
                        <h2>
                            Global Quicklinks</h2>
                        <ul id="globalQuickLinks">
                            <li>@(appSet.GlobalQuickLinks)</li>
                        </ul>
                    </div>
                </div>
                <!--Begin Search-->
                <div class="grid_3">
                    <div id="searchNav">
                        <h2>
                            Search AIA</h2>
                        <form id="searchAIAForm" name="search-site" action="#" method="get">
                        <fieldset>
                            <legend>Search AIA</legend><span>
                                <label for="mainSearchBox">
                                    Search AIA</label>
                                <input type="text" class="searchText fsrVisible" id="mainSearchBox" name="Ntt" value="请输入......"
                                    size="30" maxlength="255" autocomplete="off">
                                <a class="button" id="searchAIA">Go</a> </span>
                        </fieldset>
                        <input type="hidden" name="Nty" value="1"><input type="hidden" name="Ntx" value="mode+matchallpartial"><input
                            type="hidden" name="Ntk" value="Main_Search">
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!--END MASTHEAD WRAPPER-->
        <!--BEGIN PRIMARY NAV WRAPPER-->
        <div id="primaryWrapper">
            <!--BEGIN PRIMARY NAV CONTAINER-->
            <div id="primaryContainer" class="container_12 clearfix">
                <!--Begin Primary Nav-->
                <div class="grid_12">
                    @Html.Partial("NavigationMenu")
                </div>
            </div>
        </div>
        <!--END PRIMARY NAV WRAPPER-->
        <div id="contentWrapper">
            <!--BEGIN CONTENT CONTAINER-->
            <div id="contentContainer" class="container_12 clearfix">
                <!--Begin Page Title Header Items-->
                <!--Begin Sidebar Items-->
                <div id="sideBarContainer" class="grid_3">
                    <div id="upcomingEvents" class="boxContainer grid_3 alpha omega">
                        <h2>
                            产品分类</h2>
                        <div class="box above">
                            <div class="eventList">
                                @foreach (var productCate in layoutModels.ProductCategoryList.Where(p => p.ParentID == null || p.ParentID == 0).ToList())
                                {
                                    <div class="event">
                                        <h4>
                                            <a href="@Url.Action("Index", "Product", new { ProductCate = productCate.ID })">@(productCate.Name)</a></h4>
                                        <p class="subhead">
                                            @foreach (var subCate in layoutModels.ProductCategoryList.Where(p => p.ParentID == productCate.ID).ToList())
                                            {
                                                <span>@(subCate.Name)
                                                    |</span>  
                                            }
                                        </p>
                                        <div class="tagline">
                                        </div>
                                    </div>
                                }
                            </div>
                            <a class="learnMore" href="@Url.Action("Index", "Product", new { area = "" })">更多>></a>
                        </div>
                    </div>
                    <div class="boxContainer  grid_3 alpha omega">
                        <h2>
                            新闻公告</h2>
                        <div class="box above">
                            <ul>
                                @foreach (var article in layoutModels.ArticleList)
                                {
                                    <li><a href="@Url.Action("ViewDetails", "News", new { articleId = article.ID })" style="color:#555;">@(article.Title)</a></li>                               
                                }
                            </ul>
                        </div>
                    </div>
                    <div class="boxContainer grid_3 alpha omega">
                        <h2>
                            联系我们</h2>
                        <div class="box above">
                            <div class="linkList">
                                地址：@(layoutModels.contact.Address)<br />
                                电话：@(layoutModels.contact.Tel)<br />
                                传真：@(layoutModels.contact.Fax)<br />
                                手机：@(layoutModels.contact.Phone)<br />
                                邮箱：@(layoutModels.contact.Email)<br />
                            </div>
                        </div>
                    </div>
                    <div>
                        @(appSet.CopyRight)<br />
                        @(appSet.ICP)<br />
                    </div>
                </div>
                <div id="mainContentContainer" class="grid_9">
                    <!--Begin Hero Banner Brand Image-->
                    @RenderBody()
                </div>
            </div>
            <!--END CONTENT CONTAINER-->
        </div>
        <!--END CONTENT WRAPPER-->
        <div class="mainCap bottom">
            <!--mainCap bottom-->
        </div>
    </div>
    <!--outer-->
    <!--SS_BEGIN_SNIPPET(fragment12,body)-->
    <!--- End Google Analytics
    code --->
    <!-- ClickTale Bottom part -->
    <!--SS_END_SNIPPET(fragment12,body)-->
</body>
</html>
